package com.imooc.miaosha.validator;

import javax.validation.Constraint;
import javax.validation.Payload;
import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Retention(RetentionPolicy.RUNTIME)
@Documented
@Constraint(validatedBy = {IsMobileValidator.class})
public @interface IsMobile {
    boolean required() default true;//默认必须有
    String message() default "手机号码格式有误";//校验完毕后的提示信息

    //下面这俩玩意儿似乎也必须得加上
    Class<?>[] groups() default { };
    Class<? extends Payload>[] payload() default { };
}
